package com.guaju.yueshangLife.imageloader;

import android.app.Activity;
import android.widget.ImageView;

import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.view.SimpleDraweeView;
import com.lzy.imagepicker.loader.ImageLoader;


public class FrescoImgLoader implements ImageLoader {

    @Override
    public void displayImage(Activity activity, String path, ImageView imageView, int width, int height) {
        if (imageView instanceof SimpleDraweeView) {
            SimpleDraweeView sdv = (SimpleDraweeView) imageView;
            sdv.setImageURI(path);
        }
    }

    @Override
    public void displayImagePreview(Activity activity, String path, ImageView imageView, int width, int height) {
        if (imageView instanceof SimpleDraweeView) {
            SimpleDraweeView sdv = (SimpleDraweeView) imageView;
            sdv.setImageURI(path);
        }
    }

    @Override
    public void clearMemoryCache() {
    }
}
